<script setup lang="ts">
import {ref, onMounted} from 'vue'
import Vditor from 'vditor'
import 'vditor/dist/index.css';

const contentEditor = ref(null)

onMounted(() => {
  contentEditor.value = new Vditor('vditor', {
    height: 360,
    toolbarConfig: {
      pin: true,
    },
    cache: {
      enable: false,
    },
    after: () => {
      contentEditor.value.setValue('hello, Vditor + Vue!')
    },
  })
})
</script>

<template>
  <div id="vditor"></div>
</template>

<style scoped lang="scss">


</style>
